#include <cstdlib>
#include "starter.h"
#include "cppExtra.h"
using namespace std;
int main(int argv,char **argc) {
	if(argv>1&&argc[1][0]=='-') {
		if(argc[1][1]=='-') {
			string s=zgs(argc[1]);
			if(s=="version") {
				version();
			}
		} else {
			switch(argc[1][1]) {
				case 'v':
					version();
					break;
				case 'i':
					try {
						if(argv<=2) {
							throw("few argument");
						}
						if(!check(argc[2])) {
							throw("wrong version");
						}
						bool off=false;
						if(argv>3) {
							if(zgs(argc[3])=="--offline") {
								off=true;
							}
						}
						if(off){
							off_line_install(zgs(argc[2]));
						}
						else{
							install(zgs(argc[2]));
						}
					} catch(string s) {
						cerr << s;
					}
					break;
			}
		}
	} else {
	}
	return 0;
}
